3.259 \(\int (a+a \sin (e+f x))^3 (A+B \sin (e+f x)) (c+d \sin (e+f x))^2 \, dx\)

Optimal. Leaf size=463 \[ -\frac{a^3 \left (2 A d \left (72 c^2 d^2-15 c^3 d+2 c^4+180 c d^3+76 d^4\right )-B \left (37 c^3 d^2-112 c^2 d^3-12 c^4 d+2 c^5-304 c d^4-136 d^5\right )\right ) \cos (e+f x)}{60 d^3 f}+\frac{a^3 \left (2 A d (2 c-11 d)-B \left (2 c^2-8 c d+21 d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{40 d^3 f}-\frac{a^3 \left (2 A d \left (2 c^2-15 c d+76 d^2\right )-B \left (-12 c^2 d+2 c^3+41 c d^2-136 d^3\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{120 d^3 f}-\frac{a^3 \left (2 A d \left (-30 c^2 d+4 c^3+146 c d^2+195 d^3\right )-B \left (76 c^2 d^2-24 c^3 d+4 c^4-236 c d^3-345 d^4\right )\right ) \sin (e+f x) \cos (e+f x)}{240 d^2 f}+\frac{1}{16} a^3 x \left (A \left (40 c^2+60 c d+26 d^2\right )+B \left (30 c^2+52 c d+23 d^2\right )\right )+\frac{(-6 A d+3 B c-8 B d) \cos (e+f x) \left (a^3 \sin (e+f x)+a^3\right ) (c+d \sin (e+f x))^3}{30 d^2 f}-\frac{a B \cos (e+f x) (a \sin (e+f x)+a)^2 (c+d \sin (e+f x))^3}{6 d f} \]

[Out]

(a^3*(B*(30*c^2 + 52*c*d + 23*d^2) + A*(40*c^2 + 60*c*d + 26*d^2))*x)/16 - (a^3*(2*A*d*(2*c^4 - 15*c^3*d + 72*
c^2*d^2 + 180*c*d^3 + 76*d^4) - B*(2*c^5 - 12*c^4*d + 37*c^3*d^2 - 112*c^2*d^3 - 304*c*d^4 - 136*d^5))*Cos[e +
 f*x])/(60*d^3*f) - (a^3*(2*A*d*(4*c^3 - 30*c^2*d + 146*c*d^2 + 195*d^3) - B*(4*c^4 - 24*c^3*d + 76*c^2*d^2 -
236*c*d^3 - 345*d^4))*Cos[e + f*x]*Sin[e + f*x])/(240*d^2*f) - (a^3*(2*A*d*(2*c^2 - 15*c*d + 76*d^2) - B*(2*c^
3 - 12*c^2*d + 41*c*d^2 - 136*d^3))*Cos[e + f*x]*(c + d*Sin[e + f*x])^2)/(120*d^3*f) + (a^3*(2*A*(2*c - 11*d)*
d - B*(2*c^2 - 8*c*d + 21*d^2))*Cos[e + f*x]*(c + d*Sin[e + f*x])^3)/(40*d^3*f) - (a*B*Cos[e + f*x]*(a + a*Sin
[e + f*x])^2*(c + d*Sin[e + f*x])^3)/(6*d*f) + ((3*B*c - 6*A*d - 8*B*d)*Cos[e + f*x]*(a^3 + a^3*Sin[e + f*x])*
(c + d*Sin[e + f*x])^3)/(30*d^2*f)

________________________________________________________________________________________

Rubi [A]  time = 1.128, antiderivative size = 463, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 35, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {2976, 2968, 3023, 2753, 2734} \[ -\frac{a^3 \left (2 A d \left (72 c^2 d^2-15 c^3 d+2 c^4+180 c d^3+76 d^4\right )-B \left (37 c^3 d^2-112 c^2 d^3-12 c^4 d+2 c^5-304 c d^4-136 d^5\right )\right ) \cos (e+f x)}{60 d^3 f}+\frac{a^3 \left (2 A d (2 c-11 d)-B \left (2 c^2-8 c d+21 d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{40 d^3 f}-\frac{a^3 \left (2 A d \left (2 c^2-15 c d+76 d^2\right )-B \left (-12 c^2 d+2 c^3+41 c d^2-136 d^3\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{120 d^3 f}-\frac{a^3 \left (2 A d \left (-30 c^2 d+4 c^3+146 c d^2+195 d^3\right )-B \left (76 c^2 d^2-24 c^3 d+4 c^4-236 c d^3-345 d^4\right )\right ) \sin (e+f x) \cos (e+f x)}{240 d^2 f}+\frac{1}{16} a^3 x \left (A \left (40 c^2+60 c d+26 d^2\right )+B \left (30 c^2+52 c d+23 d^2\right )\right )+\frac{(-6 A d+3 B c-8 B d) \cos (e+f x) \left (a^3 \sin (e+f x)+a^3\right ) (c+d \sin (e+f x))^3}{30 d^2 f}-\frac{a B \cos (e+f x) (a \sin (e+f x)+a)^2 (c+d \sin (e+f x))^3}{6 d f} \]

Antiderivative was successfully verified.

[In]

Int[(a + a*Sin[e + f*x])^3*(A + B*Sin[e + f*x])*(c + d*Sin[e + f*x])^2,x]

[Out]

(a^3*(B*(30*c^2 + 52*c*d + 23*d^2) + A*(40*c^2 + 60*c*d + 26*d^2))*x)/16 - (a^3*(2*A*d*(2*c^4 - 15*c^3*d + 72*
c^2*d^2 + 180*c*d^3 + 76*d^4) - B*(2*c^5 - 12*c^4*d + 37*c^3*d^2 - 112*c^2*d^3 - 304*c*d^4 - 136*d^5))*Cos[e +
 f*x])/(60*d^3*f) - (a^3*(2*A*d*(4*c^3 - 30*c^2*d + 146*c*d^2 + 195*d^3) - B*(4*c^4 - 24*c^3*d + 76*c^2*d^2 -
236*c*d^3 - 345*d^4))*Cos[e + f*x]*Sin[e + f*x])/(240*d^2*f) - (a^3*(2*A*d*(2*c^2 - 15*c*d + 76*d^2) - B*(2*c^
3 - 12*c^2*d + 41*c*d^2 - 136*d^3))*Cos[e + f*x]*(c + d*Sin[e + f*x])^2)/(120*d^3*f) + (a^3*(2*A*(2*c - 11*d)*
d - B*(2*c^2 - 8*c*d + 21*d^2))*Cos[e + f*x]*(c + d*Sin[e + f*x])^3)/(40*d^3*f) - (a*B*Cos[e + f*x]*(a + a*Sin
[e + f*x])^2*(c + d*Sin[e + f*x])^3)/(6*d*f) + ((3*B*c - 6*A*d - 8*B*d)*Cos[e + f*x]*(a^3 + a^3*Sin[e + f*x])*
(c + d*Sin[e + f*x])^3)/(30*d^2*f)

Rule 2976

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*B*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m - 1)*(c + d*Sin[e + f*x])
^(n + 1))/(d*f*(m + n + 1)), x] + Dist[1/(d*(m + n + 1)), Int[(a + b*Sin[e + f*x])^(m - 1)*(c + d*Sin[e + f*x]
)^n*Simp[a*A*d*(m + n + 1) + B*(a*c*(m - 1) + b*d*(n + 1)) + (A*b*d*(m + n + 1) - B*(b*c*m - a*d*(2*m + n)))*S
in[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] &&
NeQ[c^2 - d^2, 0] && GtQ[m, 1/2] &&  !LtQ[n, -1] && IntegerQ[2*m] && (IntegerQ[2*n] || EqQ[c, 0])

Rule 2968

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(
e_.) + (f_.)*(x_)]), x_Symbol] :> Int[(a + b*Sin[e + f*x])^m*(A*c + (B*c + A*d)*Sin[e + f*x] + B*d*Sin[e + f*x
]^2), x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0]

Rule 3023

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (
f_.)*(x_)]^2), x_Symbol] :> -Simp[(C*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1))/(b*f*(m + 2)), x] + Dist[1/(b*
(m + 2)), Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x]
, x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] &&  !LtQ[m, -1]

Rule 2753

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> -Simp[(d
*Cos[e + f*x]*(a + b*Sin[e + f*x])^m)/(f*(m + 1)), x] + Dist[1/(m + 1), Int[(a + b*Sin[e + f*x])^(m - 1)*Simp[
b*d*m + a*c*(m + 1) + (a*d*m + b*c*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*
c - a*d, 0] && NeQ[a^2 - b^2, 0] && GtQ[m, 0] && IntegerQ[2*m]

Rule 2734

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[((2*a*c
+ b*d)*x)/2, x] + (-Simp[((b*c + a*d)*Cos[e + f*x])/f, x] - Simp[(b*d*Cos[e + f*x]*Sin[e + f*x])/(2*f), x]) /;
 FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]

Rubi steps

\begin{align*} \int (a+a \sin (e+f x))^3 (A+B \sin (e+f x)) (c+d \sin (e+f x))^2 \, dx &=-\frac{a B \cos (e+f x) (a+a \sin (e+f x))^2 (c+d \sin (e+f x))^3}{6 d f}+\frac{\int (a+a \sin (e+f x))^2 (c+d \sin (e+f x))^2 (a (2 B c+6 A d+3 B d)-a (3 B c-6 A d-8 B d) \sin (e+f x)) \, dx}{6 d}\\ &=-\frac{a B \cos (e+f x) (a+a \sin (e+f x))^2 (c+d \sin (e+f x))^3}{6 d f}+\frac{(3 B c-6 A d-8 B d) \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right ) (c+d \sin (e+f x))^3}{30 d^2 f}+\frac{\int (a+a \sin (e+f x)) (c+d \sin (e+f x))^2 \left (3 a^2 \left (2 A d (c+8 d)-B \left (c^2-3 c d-13 d^2\right )\right )-3 a^2 \left (2 A (2 c-11 d) d-B \left (2 c^2-8 c d+21 d^2\right )\right ) \sin (e+f x)\right ) \, dx}{30 d^2}\\ &=-\frac{a B \cos (e+f x) (a+a \sin (e+f x))^2 (c+d \sin (e+f x))^3}{6 d f}+\frac{(3 B c-6 A d-8 B d) \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right ) (c+d \sin (e+f x))^3}{30 d^2 f}+\frac{\int (c+d \sin (e+f x))^2 \left (3 a^3 \left (2 A d (c+8 d)-B \left (c^2-3 c d-13 d^2\right )\right )+\left (3 a^3 \left (2 A d (c+8 d)-B \left (c^2-3 c d-13 d^2\right )\right )-3 a^3 \left (2 A (2 c-11 d) d-B \left (2 c^2-8 c d+21 d^2\right )\right )\right ) \sin (e+f x)-3 a^3 \left (2 A (2 c-11 d) d-B \left (2 c^2-8 c d+21 d^2\right )\right ) \sin ^2(e+f x)\right ) \, dx}{30 d^2}\\ &=\frac{a^3 \left (2 A (2 c-11 d) d-B \left (2 c^2-8 c d+21 d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{40 d^3 f}-\frac{a B \cos (e+f x) (a+a \sin (e+f x))^2 (c+d \sin (e+f x))^3}{6 d f}+\frac{(3 B c-6 A d-8 B d) \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right ) (c+d \sin (e+f x))^3}{30 d^2 f}+\frac{\int (c+d \sin (e+f x))^2 \left (-3 a^3 d \left (2 A (2 c-65 d) d-B \left (2 c^2-12 c d+115 d^2\right )\right )+3 a^3 \left (2 A d \left (2 c^2-15 c d+76 d^2\right )-B \left (2 c^3-12 c^2 d+41 c d^2-136 d^3\right )\right ) \sin (e+f x)\right ) \, dx}{120 d^3}\\ &=-\frac{a^3 \left (2 A d \left (2 c^2-15 c d+76 d^2\right )-B \left (2 c^3-12 c^2 d+41 c d^2-136 d^3\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{120 d^3 f}+\frac{a^3 \left (2 A (2 c-11 d) d-B \left (2 c^2-8 c d+21 d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{40 d^3 f}-\frac{a B \cos (e+f x) (a+a \sin (e+f x))^2 (c+d \sin (e+f x))^3}{6 d f}+\frac{(3 B c-6 A d-8 B d) \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right ) (c+d \sin (e+f x))^3}{30 d^2 f}+\frac{\int (c+d \sin (e+f x)) \left (-3 a^3 d \left (2 A d \left (2 c^2-165 c d-152 d^2\right )-B \left (2 c^3-12 c^2 d+263 c d^2+272 d^3\right )\right )+3 a^3 \left (2 A d \left (4 c^3-30 c^2 d+146 c d^2+195 d^3\right )-B \left (4 c^4-24 c^3 d+76 c^2 d^2-236 c d^3-345 d^4\right )\right ) \sin (e+f x)\right ) \, dx}{360 d^3}\\ &=\frac{1}{16} a^3 \left (B \left (30 c^2+52 c d+23 d^2\right )+A \left (40 c^2+60 c d+26 d^2\right )\right ) x-\frac{a^3 \left (2 A d \left (2 c^4-15 c^3 d+72 c^2 d^2+180 c d^3+76 d^4\right )-B \left (2 c^5-12 c^4 d+37 c^3 d^2-112 c^2 d^3-304 c d^4-136 d^5\right )\right ) \cos (e+f x)}{60 d^3 f}-\frac{a^3 \left (2 A d \left (4 c^3-30 c^2 d+146 c d^2+195 d^3\right )-B \left (4 c^4-24 c^3 d+76 c^2 d^2-236 c d^3-345 d^4\right )\right ) \cos (e+f x) \sin (e+f x)}{240 d^2 f}-\frac{a^3 \left (2 A d \left (2 c^2-15 c d+76 d^2\right )-B \left (2 c^3-12 c^2 d+41 c d^2-136 d^3\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{120 d^3 f}+\frac{a^3 \left (2 A (2 c-11 d) d-B \left (2 c^2-8 c d+21 d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{40 d^3 f}-\frac{a B \cos (e+f x) (a+a \sin (e+f x))^2 (c+d \sin (e+f x))^3}{6 d f}+\frac{(3 B c-6 A d-8 B d) \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right ) (c+d \sin (e+f x))^3}{30 d^2 f}\\ \end{align*}

Mathematica [A]  time = 2.39877, size = 355, normalized size = 0.77 \[ -\frac{a^3 \cos (e+f x) \left (60 \left (A \left (40 c^2+60 c d+26 d^2\right )+B \left (30 c^2+52 c d+23 d^2\right )\right ) \sin ^{-1}\left (\frac{\sqrt{1-\sin (e+f x)}}{\sqrt{2}}\right )+\sqrt{\cos ^2(e+f x)} \left (-16 \left (A \left (5 c^2+30 c d+22 d^2\right )+B \left (15 c^2+44 c d+26 d^2\right )\right ) \cos (2 (e+f x))+12 d (A d+2 B c+3 B d) \cos (4 (e+f x))+720 A c^2 \sin (e+f x)+1840 A c^2+1980 A c d \sin (e+f x)-60 A c d \sin (3 (e+f x))+3360 A c d+1050 A d^2 \sin (e+f x)-90 A d^2 \sin (3 (e+f x))+1556 A d^2+990 B c^2 \sin (e+f x)-30 B c^2 \sin (3 (e+f x))+1680 B c^2+2100 B c d \sin (e+f x)-180 B c d \sin (3 (e+f x))+3112 B c d+1085 B d^2 \sin (e+f x)-140 B d^2 \sin (3 (e+f x))+5 B d^2 \sin (5 (e+f x))+1468 B d^2\right )\right )}{480 f \sqrt{\cos ^2(e+f x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Sin[e + f*x])^3*(A + B*Sin[e + f*x])*(c + d*Sin[e + f*x])^2,x]

[Out]

-(a^3*Cos[e + f*x]*(60*(B*(30*c^2 + 52*c*d + 23*d^2) + A*(40*c^2 + 60*c*d + 26*d^2))*ArcSin[Sqrt[1 - Sin[e + f
*x]]/Sqrt[2]] + Sqrt[Cos[e + f*x]^2]*(1840*A*c^2 + 1680*B*c^2 + 3360*A*c*d + 3112*B*c*d + 1556*A*d^2 + 1468*B*
d^2 - 16*(A*(5*c^2 + 30*c*d + 22*d^2) + B*(15*c^2 + 44*c*d + 26*d^2))*Cos[2*(e + f*x)] + 12*d*(2*B*c + A*d + 3
*B*d)*Cos[4*(e + f*x)] + 720*A*c^2*Sin[e + f*x] + 990*B*c^2*Sin[e + f*x] + 1980*A*c*d*Sin[e + f*x] + 2100*B*c*
d*Sin[e + f*x] + 1050*A*d^2*Sin[e + f*x] + 1085*B*d^2*Sin[e + f*x] - 30*B*c^2*Sin[3*(e + f*x)] - 60*A*c*d*Sin[
3*(e + f*x)] - 180*B*c*d*Sin[3*(e + f*x)] - 90*A*d^2*Sin[3*(e + f*x)] - 140*B*d^2*Sin[3*(e + f*x)] + 5*B*d^2*S
in[5*(e + f*x)])))/(480*f*Sqrt[Cos[e + f*x]^2])

________________________________________________________________________________________

Maple [A]  time = 0.075, size = 725, normalized size = 1.6 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sin(f*x+e))^3*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))^2,x)

[Out]

1/f*(-1/3*A*a^3*c^2*(2+sin(f*x+e)^2)*cos(f*x+e)+2*A*a^3*c*d*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8
*f*x+3/8*e)-1/5*A*a^3*d^2*(8/3+sin(f*x+e)^4+4/3*sin(f*x+e)^2)*cos(f*x+e)+B*a^3*c^2*(-1/4*(sin(f*x+e)^3+3/2*sin
(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)-2/5*B*a^3*c*d*(8/3+sin(f*x+e)^4+4/3*sin(f*x+e)^2)*cos(f*x+e)+B*a^3*d^2*(-1/
6*(sin(f*x+e)^5+5/4*sin(f*x+e)^3+15/8*sin(f*x+e))*cos(f*x+e)+5/16*f*x+5/16*e)+3*A*a^3*c^2*(-1/2*sin(f*x+e)*cos
(f*x+e)+1/2*f*x+1/2*e)-2*A*a^3*c*d*(2+sin(f*x+e)^2)*cos(f*x+e)+3*A*a^3*d^2*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))
*cos(f*x+e)+3/8*f*x+3/8*e)-B*a^3*c^2*(2+sin(f*x+e)^2)*cos(f*x+e)+6*B*a^3*c*d*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e
))*cos(f*x+e)+3/8*f*x+3/8*e)-3/5*B*a^3*d^2*(8/3+sin(f*x+e)^4+4/3*sin(f*x+e)^2)*cos(f*x+e)-3*A*a^3*c^2*cos(f*x+
e)+6*A*a^3*c*d*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-A*a^3*d^2*(2+sin(f*x+e)^2)*cos(f*x+e)+3*B*a^3*c^2*(-
1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-2*B*a^3*c*d*(2+sin(f*x+e)^2)*cos(f*x+e)+3*B*a^3*d^2*(-1/4*(sin(f*x+e)
^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)+A*a^3*c^2*(f*x+e)-2*A*a^3*c*d*cos(f*x+e)+A*a^3*d^2*(-1/2*sin(f*x+
e)*cos(f*x+e)+1/2*f*x+1/2*e)-B*a^3*c^2*cos(f*x+e)+2*B*a^3*c*d*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-1/3*B
*a^3*d^2*(2+sin(f*x+e)^2)*cos(f*x+e))

________________________________________________________________________________________

Maxima [A]  time = 1.02578, size = 950, normalized size = 2.05 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^3*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))^2,x, algorithm="maxima")

[Out]

1/960*(320*(cos(f*x + e)^3 - 3*cos(f*x + e))*A*a^3*c^2 + 720*(2*f*x + 2*e - sin(2*f*x + 2*e))*A*a^3*c^2 + 960*
(f*x + e)*A*a^3*c^2 + 960*(cos(f*x + e)^3 - 3*cos(f*x + e))*B*a^3*c^2 + 30*(12*f*x + 12*e + sin(4*f*x + 4*e) -
 8*sin(2*f*x + 2*e))*B*a^3*c^2 + 720*(2*f*x + 2*e - sin(2*f*x + 2*e))*B*a^3*c^2 + 1920*(cos(f*x + e)^3 - 3*cos
(f*x + e))*A*a^3*c*d + 60*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*A*a^3*c*d + 1440*(2*f*x + 2*
e - sin(2*f*x + 2*e))*A*a^3*c*d - 128*(3*cos(f*x + e)^5 - 10*cos(f*x + e)^3 + 15*cos(f*x + e))*B*a^3*c*d + 192
0*(cos(f*x + e)^3 - 3*cos(f*x + e))*B*a^3*c*d + 180*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*B*
a^3*c*d + 480*(2*f*x + 2*e - sin(2*f*x + 2*e))*B*a^3*c*d - 64*(3*cos(f*x + e)^5 - 10*cos(f*x + e)^3 + 15*cos(f
*x + e))*A*a^3*d^2 + 960*(cos(f*x + e)^3 - 3*cos(f*x + e))*A*a^3*d^2 + 90*(12*f*x + 12*e + sin(4*f*x + 4*e) -
8*sin(2*f*x + 2*e))*A*a^3*d^2 + 240*(2*f*x + 2*e - sin(2*f*x + 2*e))*A*a^3*d^2 - 192*(3*cos(f*x + e)^5 - 10*co
s(f*x + e)^3 + 15*cos(f*x + e))*B*a^3*d^2 + 320*(cos(f*x + e)^3 - 3*cos(f*x + e))*B*a^3*d^2 + 5*(4*sin(2*f*x +
 2*e)^3 + 60*f*x + 60*e + 9*sin(4*f*x + 4*e) - 48*sin(2*f*x + 2*e))*B*a^3*d^2 + 90*(12*f*x + 12*e + sin(4*f*x
+ 4*e) - 8*sin(2*f*x + 2*e))*B*a^3*d^2 - 2880*A*a^3*c^2*cos(f*x + e) - 960*B*a^3*c^2*cos(f*x + e) - 1920*A*a^3
*c*d*cos(f*x + e))/f

________________________________________________________________________________________

Fricas [A]  time = 2.48562, size = 713, normalized size = 1.54 \begin{align*} -\frac{48 \,{\left (2 \, B a^{3} c d +{\left (A + 3 \, B\right )} a^{3} d^{2}\right )} \cos \left (f x + e\right )^{5} - 80 \,{\left ({\left (A + 3 \, B\right )} a^{3} c^{2} + 2 \,{\left (3 \, A + 5 \, B\right )} a^{3} c d +{\left (5 \, A + 7 \, B\right )} a^{3} d^{2}\right )} \cos \left (f x + e\right )^{3} - 15 \,{\left (10 \,{\left (4 \, A + 3 \, B\right )} a^{3} c^{2} + 4 \,{\left (15 \, A + 13 \, B\right )} a^{3} c d +{\left (26 \, A + 23 \, B\right )} a^{3} d^{2}\right )} f x + 960 \,{\left ({\left (A + B\right )} a^{3} c^{2} + 2 \,{\left (A + B\right )} a^{3} c d +{\left (A + B\right )} a^{3} d^{2}\right )} \cos \left (f x + e\right ) + 5 \,{\left (8 \, B a^{3} d^{2} \cos \left (f x + e\right )^{5} - 2 \,{\left (6 \, B a^{3} c^{2} + 12 \,{\left (A + 3 \, B\right )} a^{3} c d +{\left (18 \, A + 31 \, B\right )} a^{3} d^{2}\right )} \cos \left (f x + e\right )^{3} + 3 \,{\left (2 \,{\left (12 \, A + 17 \, B\right )} a^{3} c^{2} + 4 \,{\left (17 \, A + 19 \, B\right )} a^{3} c d +{\left (38 \, A + 41 \, B\right )} a^{3} d^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{240 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^3*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))^2,x, algorithm="fricas")

[Out]

-1/240*(48*(2*B*a^3*c*d + (A + 3*B)*a^3*d^2)*cos(f*x + e)^5 - 80*((A + 3*B)*a^3*c^2 + 2*(3*A + 5*B)*a^3*c*d +
(5*A + 7*B)*a^3*d^2)*cos(f*x + e)^3 - 15*(10*(4*A + 3*B)*a^3*c^2 + 4*(15*A + 13*B)*a^3*c*d + (26*A + 23*B)*a^3
*d^2)*f*x + 960*((A + B)*a^3*c^2 + 2*(A + B)*a^3*c*d + (A + B)*a^3*d^2)*cos(f*x + e) + 5*(8*B*a^3*d^2*cos(f*x
+ e)^5 - 2*(6*B*a^3*c^2 + 12*(A + 3*B)*a^3*c*d + (18*A + 31*B)*a^3*d^2)*cos(f*x + e)^3 + 3*(2*(12*A + 17*B)*a^
3*c^2 + 4*(17*A + 19*B)*a^3*c*d + (38*A + 41*B)*a^3*d^2)*cos(f*x + e))*sin(f*x + e))/f

________________________________________________________________________________________

Sympy [A]  time = 11.3352, size = 1804, normalized size = 3.9 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))**3*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))**2,x)

[Out]

Piecewise((3*A*a**3*c**2*x*sin(e + f*x)**2/2 + 3*A*a**3*c**2*x*cos(e + f*x)**2/2 + A*a**3*c**2*x - A*a**3*c**2
*sin(e + f*x)**2*cos(e + f*x)/f - 3*A*a**3*c**2*sin(e + f*x)*cos(e + f*x)/(2*f) - 2*A*a**3*c**2*cos(e + f*x)**
3/(3*f) - 3*A*a**3*c**2*cos(e + f*x)/f + 3*A*a**3*c*d*x*sin(e + f*x)**4/4 + 3*A*a**3*c*d*x*sin(e + f*x)**2*cos
(e + f*x)**2/2 + 3*A*a**3*c*d*x*sin(e + f*x)**2 + 3*A*a**3*c*d*x*cos(e + f*x)**4/4 + 3*A*a**3*c*d*x*cos(e + f*
x)**2 - 5*A*a**3*c*d*sin(e + f*x)**3*cos(e + f*x)/(4*f) - 6*A*a**3*c*d*sin(e + f*x)**2*cos(e + f*x)/f - 3*A*a*
*3*c*d*sin(e + f*x)*cos(e + f*x)**3/(4*f) - 3*A*a**3*c*d*sin(e + f*x)*cos(e + f*x)/f - 4*A*a**3*c*d*cos(e + f*
x)**3/f - 2*A*a**3*c*d*cos(e + f*x)/f + 9*A*a**3*d**2*x*sin(e + f*x)**4/8 + 9*A*a**3*d**2*x*sin(e + f*x)**2*co
s(e + f*x)**2/4 + A*a**3*d**2*x*sin(e + f*x)**2/2 + 9*A*a**3*d**2*x*cos(e + f*x)**4/8 + A*a**3*d**2*x*cos(e +
f*x)**2/2 - A*a**3*d**2*sin(e + f*x)**4*cos(e + f*x)/f - 15*A*a**3*d**2*sin(e + f*x)**3*cos(e + f*x)/(8*f) - 4
*A*a**3*d**2*sin(e + f*x)**2*cos(e + f*x)**3/(3*f) - 3*A*a**3*d**2*sin(e + f*x)**2*cos(e + f*x)/f - 9*A*a**3*d
**2*sin(e + f*x)*cos(e + f*x)**3/(8*f) - A*a**3*d**2*sin(e + f*x)*cos(e + f*x)/(2*f) - 8*A*a**3*d**2*cos(e + f
*x)**5/(15*f) - 2*A*a**3*d**2*cos(e + f*x)**3/f + 3*B*a**3*c**2*x*sin(e + f*x)**4/8 + 3*B*a**3*c**2*x*sin(e +
f*x)**2*cos(e + f*x)**2/4 + 3*B*a**3*c**2*x*sin(e + f*x)**2/2 + 3*B*a**3*c**2*x*cos(e + f*x)**4/8 + 3*B*a**3*c
**2*x*cos(e + f*x)**2/2 - 5*B*a**3*c**2*sin(e + f*x)**3*cos(e + f*x)/(8*f) - 3*B*a**3*c**2*sin(e + f*x)**2*cos
(e + f*x)/f - 3*B*a**3*c**2*sin(e + f*x)*cos(e + f*x)**3/(8*f) - 3*B*a**3*c**2*sin(e + f*x)*cos(e + f*x)/(2*f)
 - 2*B*a**3*c**2*cos(e + f*x)**3/f - B*a**3*c**2*cos(e + f*x)/f + 9*B*a**3*c*d*x*sin(e + f*x)**4/4 + 9*B*a**3*
c*d*x*sin(e + f*x)**2*cos(e + f*x)**2/2 + B*a**3*c*d*x*sin(e + f*x)**2 + 9*B*a**3*c*d*x*cos(e + f*x)**4/4 + B*
a**3*c*d*x*cos(e + f*x)**2 - 2*B*a**3*c*d*sin(e + f*x)**4*cos(e + f*x)/f - 15*B*a**3*c*d*sin(e + f*x)**3*cos(e
 + f*x)/(4*f) - 8*B*a**3*c*d*sin(e + f*x)**2*cos(e + f*x)**3/(3*f) - 6*B*a**3*c*d*sin(e + f*x)**2*cos(e + f*x)
/f - 9*B*a**3*c*d*sin(e + f*x)*cos(e + f*x)**3/(4*f) - B*a**3*c*d*sin(e + f*x)*cos(e + f*x)/f - 16*B*a**3*c*d*
cos(e + f*x)**5/(15*f) - 4*B*a**3*c*d*cos(e + f*x)**3/f + 5*B*a**3*d**2*x*sin(e + f*x)**6/16 + 15*B*a**3*d**2*
x*sin(e + f*x)**4*cos(e + f*x)**2/16 + 9*B*a**3*d**2*x*sin(e + f*x)**4/8 + 15*B*a**3*d**2*x*sin(e + f*x)**2*co
s(e + f*x)**4/16 + 9*B*a**3*d**2*x*sin(e + f*x)**2*cos(e + f*x)**2/4 + 5*B*a**3*d**2*x*cos(e + f*x)**6/16 + 9*
B*a**3*d**2*x*cos(e + f*x)**4/8 - 11*B*a**3*d**2*sin(e + f*x)**5*cos(e + f*x)/(16*f) - 3*B*a**3*d**2*sin(e + f
*x)**4*cos(e + f*x)/f - 5*B*a**3*d**2*sin(e + f*x)**3*cos(e + f*x)**3/(6*f) - 15*B*a**3*d**2*sin(e + f*x)**3*c
os(e + f*x)/(8*f) - 4*B*a**3*d**2*sin(e + f*x)**2*cos(e + f*x)**3/f - B*a**3*d**2*sin(e + f*x)**2*cos(e + f*x)
/f - 5*B*a**3*d**2*sin(e + f*x)*cos(e + f*x)**5/(16*f) - 9*B*a**3*d**2*sin(e + f*x)*cos(e + f*x)**3/(8*f) - 8*
B*a**3*d**2*cos(e + f*x)**5/(5*f) - 2*B*a**3*d**2*cos(e + f*x)**3/(3*f), Ne(f, 0)), (x*(A + B*sin(e))*(c + d*s
in(e))**2*(a*sin(e) + a)**3, True))

________________________________________________________________________________________

Giac [A]  time = 1.32552, size = 513, normalized size = 1.11 \begin{align*} -\frac{B a^{3} d^{2} \sin \left (6 \, f x + 6 \, e\right )}{192 \, f} + \frac{1}{16} \,{\left (40 \, A a^{3} c^{2} + 30 \, B a^{3} c^{2} + 60 \, A a^{3} c d + 52 \, B a^{3} c d + 26 \, A a^{3} d^{2} + 23 \, B a^{3} d^{2}\right )} x - \frac{{\left (2 \, B a^{3} c d + A a^{3} d^{2} + 3 \, B a^{3} d^{2}\right )} \cos \left (5 \, f x + 5 \, e\right )}{80 \, f} + \frac{{\left (4 \, A a^{3} c^{2} + 12 \, B a^{3} c^{2} + 24 \, A a^{3} c d + 34 \, B a^{3} c d + 17 \, A a^{3} d^{2} + 19 \, B a^{3} d^{2}\right )} \cos \left (3 \, f x + 3 \, e\right )}{48 \, f} - \frac{{\left (30 \, A a^{3} c^{2} + 26 \, B a^{3} c^{2} + 52 \, A a^{3} c d + 46 \, B a^{3} c d + 23 \, A a^{3} d^{2} + 21 \, B a^{3} d^{2}\right )} \cos \left (f x + e\right )}{8 \, f} + \frac{{\left (2 \, B a^{3} c^{2} + 4 \, A a^{3} c d + 12 \, B a^{3} c d + 6 \, A a^{3} d^{2} + 9 \, B a^{3} d^{2}\right )} \sin \left (4 \, f x + 4 \, e\right )}{64 \, f} - \frac{{\left (48 \, A a^{3} c^{2} + 64 \, B a^{3} c^{2} + 128 \, A a^{3} c d + 128 \, B a^{3} c d + 64 \, A a^{3} d^{2} + 63 \, B a^{3} d^{2}\right )} \sin \left (2 \, f x + 2 \, e\right )}{64 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^3*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))^2,x, algorithm="giac")

[Out]

-1/192*B*a^3*d^2*sin(6*f*x + 6*e)/f + 1/16*(40*A*a^3*c^2 + 30*B*a^3*c^2 + 60*A*a^3*c*d + 52*B*a^3*c*d + 26*A*a
^3*d^2 + 23*B*a^3*d^2)*x - 1/80*(2*B*a^3*c*d + A*a^3*d^2 + 3*B*a^3*d^2)*cos(5*f*x + 5*e)/f + 1/48*(4*A*a^3*c^2
 + 12*B*a^3*c^2 + 24*A*a^3*c*d + 34*B*a^3*c*d + 17*A*a^3*d^2 + 19*B*a^3*d^2)*cos(3*f*x + 3*e)/f - 1/8*(30*A*a^
3*c^2 + 26*B*a^3*c^2 + 52*A*a^3*c*d + 46*B*a^3*c*d + 23*A*a^3*d^2 + 21*B*a^3*d^2)*cos(f*x + e)/f + 1/64*(2*B*a
^3*c^2 + 4*A*a^3*c*d + 12*B*a^3*c*d + 6*A*a^3*d^2 + 9*B*a^3*d^2)*sin(4*f*x + 4*e)/f - 1/64*(48*A*a^3*c^2 + 64*
B*a^3*c^2 + 128*A*a^3*c*d + 128*B*a^3*c*d + 64*A*a^3*d^2 + 63*B*a^3*d^2)*sin(2*f*x + 2*e)/f